package instructions;

import memory.Address;
import memory.Memory;
import memory.Word;
import Computer.ProgramCounter;

public class Copy implements Instruction {
	private Word word; 
	private Address address;
	
	public Copy(Word word, Address address) {
		this.word = word;
		this.address = address;
	}
	public void execute(Memory memory, ProgramCounter counter) {
		memory.setWord(address, word);
		counter.increase();
	}
	
	public String toString(){
		return "COPY " + word  + " ["+ address + "]\n";
	}

}
